package com.xmg.p2p.base.domain;

import com.xmg.p2p.base.util.BitStatesUtils;

public class Userinfo extends BaseDomain{
    private int version;
    private long bitState;
    private String realName;
    private String idNumber;
    private String phoneNumber;
    private String email;
    private int score;//风控累计分数
    private Long realAuthId;
    private SystemDictionaryItem incomeGrade;
    private SystemDictionaryItem marriage;
    private SystemDictionaryItem kidCount;
    private SystemDictionaryItem educationBackground;
    private SystemDictionaryItem houseCondition;

    public Long getRealAuthId() {
        return realAuthId;
    }

    public void setRealAuthId(Long realAuthId) {
        this.realAuthId = realAuthId;
    }

    public void addState(long state){
        this.setBitState(BitStatesUtils.addState(state,bitState));
    }

    public void removeState(long state){
        this.setBitState(BitStatesUtils.removeState(state,bitState));
    }

    public boolean getIsBindPhone(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_BIND_PHONE);
    }

    public boolean getIsBindEmail(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_BIND_EMAIL);
    }

    public boolean getIsBasicInfo(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_BASIC_INFO);
    }

    public boolean getIsRealAuth(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_REAL_AUTH);
    }

    public boolean getIsVideoAuth(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_VIDEO_AUTH);
    }

    public boolean getHasBidRequestProcess(){
        return BitStatesUtils.hasState(bitState,BitStatesUtils.OP_HAS_BIDREQUEST_PROCESS);
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public long getBitState() {
        return bitState;
    }

    public void setBitState(long bitState) {
        this.bitState = bitState;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getIdNumber() {
        return idNumber;
    }

    public void setIdNumber(String idNumber) {
        this.idNumber = idNumber;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public SystemDictionaryItem getIncomeGrade() {
        return incomeGrade;
    }

    public void setIncomeGrade(SystemDictionaryItem incomeGrade) {
        this.incomeGrade = incomeGrade;
    }

    public SystemDictionaryItem getMarriage() {
        return marriage;
    }

    public void setMarriage(SystemDictionaryItem marriage) {
        this.marriage = marriage;
    }

    public SystemDictionaryItem getKidCount() {
        return kidCount;
    }

    public void setKidCount(SystemDictionaryItem kidCount) {
        this.kidCount = kidCount;
    }

    public SystemDictionaryItem getEducationBackground() {
        return educationBackground;
    }

    public void setEducationBackground(SystemDictionaryItem educationBackground) {
        this.educationBackground = educationBackground;
    }

    public SystemDictionaryItem getHouseCondition() {
        return houseCondition;
    }

    public void setHouseCondition(SystemDictionaryItem houseCondition) {
        this.houseCondition = houseCondition;
    }
}
